#ifndef _AC_H
#define _AC_H

#define AC_CALLBACK_TYPE_READ 0
#define AC_CALLBACK_TYPE_WRITE 1
#define AC_CALLBACK_TYPE_EXCEPT 2

typedef void (*ac_callback)(int, void*);

int ac_init();
void ac_shutdown();

int ac_callback_register(int, int, ac_callback, void*, int);
int ac_callback_unregister(int, int);

void ac_mainloop(); /*TODO: return an int, then do error messages*/
void ac_mainloop_daemonize();
#endif
